<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js练习1</title>
</head>
<body>
    <script>
        // let arr = new Array();
        // console.log(arr);
        // let arr1 = [];
        // console.log(arr1);
        // let arr2 = [1,2,"hello",false];
        // console.log(arr2);

        // console.log(arr2[0]);
        // console.log(arr2[4]);
        // arr2[4] = "world";
        // console.log(arr2[4]);
        // arr2[4] = "hahaha";
        // console.log(arr2[4]);

        // arr2.splice(3,2);
        // console.log(arr2.length);

        // function add(x, y) {
        //     return x + y; 
        // }
        // console.log(add(10, 20));

        // let add = function (x, y) {
        //     return x + y;
        // }
        // console.log(add(20, 50));

        // let a = {};
        // let b = {
        //     name: "zhangsan",
        //     gender: 1,
        //     class: "java1班",
        //     sno: 10000
        // };
        // console.log(b.name);
        // b.class = 10001;
        // console.log(b.class);
        let c = new Object();
        // console.log(a);
        // console.log(b);
        console.log(c);
        c.name = "zhangsan";
        c.gender = 0;
        c.sno = 10000;
        c.height = 120;
        c.weight = 170;
        console.log(c);
        
        
        
        
        
        
        
        
        
        
        
    </script>
</body>
</html>